using System;
using System.Xml;

namespace Mbs.CastleContainer
{
    class UndefProcessingInstructionProcessor : AbstractStatementElementProcessor
    {
        public UndefProcessingInstructionProcessor()
        {
        }

        public override String Name
        {
            get { return "undef"; }
        }

        public override XmlNodeType[] AcceptNodeTypes
        {
            get { return new XmlNodeType[] { XmlNodeType.ProcessingInstruction }; }
        }

        public override void Process(IXmlProcessorNodeList nodeList, IXmlProcessorEngine engine)
        {
            XmlProcessingInstruction node = nodeList.Current as XmlProcessingInstruction;

            engine.RemoveFlag(node.Data);

            RemoveItSelf(node);
        }
    }
}
